home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
mac
/
files
/
t_sys5
/
unixcpio.gz
/
unixnet.cpio
/
mkdep
(
.txt
)
< prev
next >
Wrap
Microsoft Windows Help File Content
|
1994-07-11
|
741b
|
30 lines
# @(#) depend v1.0 Create a makefile of dependencies
# Author: Jeffrey Kegler
cpparg=
linelen=60 # desired length of dependency line
for arg in "$@"
case $arg in
-[CT] | -[UID]*) cpparg="$cpparg $arg"
esac
for source in "$@"
target=`expr "$source" : '\\(.*\\)\\.c$'`
if [ -n "$target" ]; then
target=`basename "$target"`
/lib/cpp $cpparg "$source" |
sed -n -e 's/ 1$//' -e 's/^# 1 "\(.*\)"/\1/p' |
awk '
BEGIN { deplist = "'$target.o:'" }
NR > 1 {
used++;
if (length(deplist "\t" $0) >= '$linelen') {
print deplist "\\"
deplist = "\t" $0
} else deplist = deplist "\t" $0
END {
if (used)
{
if (deplist != "") print deplist
print
}
exit 0